chore(examples): add -S to env shebangs for portability#3210
Open
lucky-verma wants to merge 1 commit intoopenai:nextfrom
Open
chore(examples): add -S to env shebangs for portability#3210lucky-verma wants to merge 1 commit intoopenai:nextfrom
lucky-verma wants to merge 1 commit intoopenai:nextfrom
Conversation
Four examples use the rye shebang without the -S flag: examples/audio.py examples/speech_to_text.py examples/text_to_speech.py examples/realtime/realtime.py CONTRIBUTING.md shows the canonical form as #!/usr/bin/env -S rye run python. Without -S, BSD env (older macOS) treats 'rye run python' as a single program name and fails. This brings these four files in line with the documented canonical form and the other examples that already use -S (e.g. responses/background_streaming.py).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
four example shebangs are missing the
-Sflag:they currently use
#!/usr/bin/env rye run python. CONTRIBUTING.md shows the canonical form as#!/usr/bin/env -S rye run pythonand other examples (responses/background_streaming.pyfor instance) already use that. without-S, BSD env on older macOS treatsrye run pythonas a single program name and the script fails. linux env splits args by default since coreutils 8.30 so it works there either way, but the-Sform is the portable one.ran ruff check + format on all four, both clean. only the shebang line changed in each file.